package com.xuecheng.content.api;

import com.xuecheng.model.dto.CourseCategoryTreeDto;
import com.xuecheng.service.CourseCategoryService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author 小班哥
 * @version 1.0
 * @date 2023/3/12 19:40
 * @description 课程分类查询
 */

@Api(value = "课程分类" , tags = "课程分类查询接口")
@RestController
public class CourseCategoryController {

    @Autowired
    private CourseCategoryService courseCategoryService;

    @ApiOperation("课程分类查询接口")
    @GetMapping("/course-category/tree-nodes")
    public List<CourseCategoryTreeDto> queryTreeNodes(){
       return courseCategoryService.queryTreeNodes("1");
    }
}
